package tech.wenxu.ssoprovider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tech.wenxu.ssoprovider.pojo.User;

/**
 * @author zhaowenxu
 * @date 2020/4/13 15:07
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 检查数据是否可用
     *
     * @param paramType 类型
     * @param param     值
     */
    @Select("select count(1) from tb_user where ${paramType} = #{param}")
    Integer check(@Param("paramType") String paramType, @Param("param") String param);


}
